package me.sealer.event.listener;

import me.sealer.event.DemoEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * Created by sealer on 09-09-2017.
 */
@Component
public class DemoListener implements ApplicationListener<DemoEvent> {
    Logger logger = LoggerFactory.getLogger(DemoListener.class);
    @Override
    public void onApplicationEvent(DemoEvent demoEvent) {
        String message = demoEvent.getMessage();
        logger.info("我(DemoListener)接收到了时间消息：" + message);
    }
}
